<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>居中布局</title>
<style>
.center_middle{
    position:absolute;
    background-color:red;
    color:white;
    width:600px;
    height:400px;
    left:50%;
    top:50%;
    margin-left:-300px;
    margin-top:-200px;
}
</style>
</head>
<body>
<div class="center_middle">内容</div>
</body>
</html>
